<div class="page-content">
  <!--pages/order/index.wxml-->
 
<div class="tab">
  <div   v-on:click='setStatus(0)'  :class="status==''?'tabli on':'tabli'"><span>全部</span></div>
   <div   v-on:click='setStatus(2)'   :class="status==2?'tabli on':'tabli'"><span>待处理</span></div>
   <div  v-on:click='setStatus(3)'  :class="status==3?'tabli on':'tabli'"><span>处理中</span></div>
   <div   v-on:click='setStatus(4)'   :class="status==4?'tabli on':'tabli'"><span>已完成</span></div>
</div>

<section class="errormsgDiv"   v-if="nodata">
    <p class="errormsg">\（￣︶￣）/</p>
    <p class="errormsg2">没有查到相关订单</p>
 </section>
 
 <section v-else>     
<div class="cart-goods" style="border:none"  v-for="data in listData" v-if="data.sub_order && data.sub_order.order_sn">
<!-- 扫餐桌码下的订单 -->
  <div v-if='data.order_type=="book"'>
    <div class="mymedia">
            <!-- <div class="text-over-hidden">预约： {{data.sub_order.dining_table_name}}</div> -->
             <div  class="time" style="margin-top: 5px;"> <span class="light">预约</span> {{data.sub_order.dining_table_name}}</div>
          <div  class="time "> <span class="light">店名</span>{{data.shop.name}} <span class='pd5-h'>•</span> <a :href="'tel:'+data.shop.hotline"> {{data.shop.hotline}} </a></div>
          <div  class="time"><span class="light">到店时间</span>{{data.sub_order.time}} </div>

           <div  class="time"><span class="light">备注</span>{{data.sub_order.remark?data.sub_order.remark:'无'}} </div>
           <div  class="time"><span class="light">联系人</span> {{data.sub_order.contacts}} <span class='pd5-h'>•</span> {{data.sub_order.phone}}  </div>
           <div  class="time"><span class="light">预定费</span> ¥{{data.sub_order.money}}<span class='pd5-h'>•</span> {{data.sub_order.people}}  </div>
           <div  class="time"><span class="light">状态</span> <span class=" color_0">{{data.statusText}} </span></div>

          <div class="clear"></div>
          <div class="line mgt10"></div>
            <div class="goods-bottom"><span v-if="data.paytypeText"> 支付方式：</span>  <span class=" color_0">{{data.paytypeText}}</span> 
              <span class='pd5-h'></span> 
               <span> 支付状态：</span>  <span class=" color_0">{{data.payStatusText}}</span> 
               
              
            </div>
             <div class="goods-btns mgt10">
              <a class="order_btn" style="width: 100%" v-on:click='topay(data.order_sn)' v-if="data.status==1">支付</a>
              <div class="clear"></div>
          </div>
        </div>
  </div>
 <!-- 扫餐桌码下的订单 -->
 <div v-if='data.order_type=="orderOffline"'>
    <div class="cart-title">
    <span class="s_left">{{data.shop.name}} • {{data.sub_order.tableInfo.name}}</span>
    <span class="s_right color_0">{{data.sub_order.statusText}}</span>
    <div class="clear"></div>
    </div>
     <router-link :to="{ name: 'eatInHallOrder', params: { order_sn: data.order_sn }}"   :class=" data.sub_order.goods_info.length>1?'goods-item-list goods-item-list-more':'goods-item-list'">
      <div class="goods-item" v-for="item in data.sub_order.goods_info">
              <image class='image' :src='item.default_img+"?imagediv2/1/w/160/h/160"'></image>
              <div class='goods-info' style="margin-top: 0px; ">
                <div class="title1 span-over-hidden" >{{item.goods_name}}</div>
                <div class="light">{{item.attrs}}</div>
              </div>
            
              <div class="clear"></div>
      </div>

       <div class="clear"></div>
    </router-link>
     <div class="goods-bottom">共{{data.sub_order.goods_info.length}}件商品 <span>  应付¥ {{data.order_amount}}</span> </div>
      <div class="goods-bottom"><span v-if="data.paytypeText"> 支付方式：</span>  <span class=" color_0">{{data.paytypeText}}</span> <span class='pd5-h'></span>  <span> 支付状态：</span>  <span class=" color_0">{{data.payStatusText}}</span> </div>
    <div class="goods-bottom">
    
    <div class="line"></div>
    <div class="goods-bottom color_0"></div>
    <div class="goods-btns">
        <a class="order_btn btn2 border_none" v-on:click='topay(data.order_sn)' v-if="data.paystatus==0 && data.status!=4">在线支付</a>
        <router-link   :to="{ name: 'eatInHallOrder', params: { order_sn: data.order_sn }}" class="order_btn" >查看订单</router-link>
        <div class="clear"></div>
    </div>
  </div>
</div>
 
 <!-- 扫餐桌码下的结束 --> 



<!-- 商品购买shopping-->
  
<div v-if='data.order_type=="shopping"'>

    <div class="cart-title">
    <a  :href="app.params.apiDomain+'mall/pages/renderPage?page=pages/index/index&shop_id='+data.shop.id" class="s_left" style="max-width: 80%;">{{data.shop.name}}  
      <img class='arrowright' style="height: 11px;" src='/pages/user/images/arrowright.png' />
    </a>
    <span class="s_right color_0">{{data.sub_order.statusText}}</span>
    <div class="clear"></div>
    </div>
     <router-link :to="{ name: 'orderDetail', params: { order_sn: data.order_sn }}"   :class=" data.sub_order.goods_info.length>1?'goods-item-list goods-item-list-more':'goods-item-list'">
      <div class="goods-item" v-for="item in data.sub_order.goods_info">
              <image class='image' :src='item.default_img+"?imagediv2/1/w/160/h/160"'></image>
              <div class='goods-info' style="margin-top: 0px; ">
                <div class="title1 span-over-hidden" >{{item.goods_name}}</div>
                <div class="light">{{item.attrs}}</div>
              </div>
            
              <div class="clear"></div>
      </div>

       <div class="clear"></div>
    </router-link>
    <div class="goods-bottom">
          共{{data.sub_order.goods_info.length}}件商品 <span>  实付¥ {{data.order_amount}}
        </div>
      <div class="goods-bottom">
           <span v-if="data.paytypeText"> 支付方式：</span>  <span class=" color_0">{{data.paytypeText}}</span> <span class='pd5-h'></span>  <span> 支付状态：</span>  <span class=" color_0">{{data.payStatusText}}</span> 
        </div>
    <div class="line"></div>
    <div class="goods-bottom color_0">{{data.sub_order.deliver_type}} {{data.sub_order.deliver_time_str}}</div>
    <div class="goods-btns">
        <a class="order_btn btn2 border_none" v-on:click='topay(data.order_sn)' v-if="data.status==1">支付</a>
    
        <router-link   :to="{ name: 'orderDetail', params: { order_sn: data.order_sn }}" class="order_btn" >查看订单</router-link>
        <div class="clear"></div>
    </div>
</div>
 
<!-- 商品购买shop end -->

</div>
 </section>     
    
 
</div>
